cmake_minimum_required(VERSION 3.0)

project(VisitorMode)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")             # c++11
set(CMAKE_CXX_FLAGS "-g ${CMAKE_CXX_FLAGS}")                     # 调试信息
set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}")                  # 开启所有警告

# 设置可执行文件的输出目录
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin)

# 添加可执行文件
add_executable(${PROJECT_NAME} main.cpp)

# 添加包含的目录
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Administrator)
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Interviewee)
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Visitor/)

# 添加源文件
target_sources(${PROJECT_NAME} PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}/Administrator/Administrator.h
    ${CMAKE_CURRENT_SOURCE_DIR}/Interviewee/AbstractInterviewee.h
    ${CMAKE_CURRENT_SOURCE_DIR}/Interviewee/IntervieweeApple.h
    ${CMAKE_CURRENT_SOURCE_DIR}/Interviewee/IntervieweeBook.h
    ${CMAKE_CURRENT_SOURCE_DIR}/Visitor/AbstractVisitor.h
    ${CMAKE_CURRENT_SOURCE_DIR}/Visitor/VisitorCustomer.h
    ${CMAKE_CURRENT_SOURCE_DIR}/Visitor/VisitorSaler.h
)